﻿@using LaxCraft.Repositories;
@using LaxCraft.Domain;
@using LaxCraft.Helpers;
@{
    ViewBag.Title = @ViewBag.Post.Title;
}
<h2>
    Details</h2>
<fieldset>
    <legend>Fields</legend>
    <div class="display-label">
        Title</div>
    <div class="display-field">@ViewBag.Post.Title</div>
    <div class="display-label">
        Body</div>
    <div class="display-field">@ViewBag.Post.Body</div>
    <div class="display-label">
        Tags</div>
    <div class="display-field">@ViewBag.Post.Tags</div>
    <div class="display-label">
        CreatedBy</div>
    <div class="display-field">@ViewBag.Post.CreatedBy</div>
    <div class="display-label">
        CreatedOn</div>
    <div class="display-field">@String.Format("{0:g}", ViewBag.Post.CreatedOn)</div>
</fieldset>

@Html.ActionLink("Back to List", "Index")
@if (ViewBag.Admin) {
    <p>
        | @Html.ActionLink("Edit", "Edit", new { id = Model.Id })
    </p>
}
